UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'MOFrb6YqtZ72jdtS3FnNSO56PMj2z/ZhiytL5Ggw40s='
WHERE
key_id = '1e6007a3cfb64954e18d8c7396a497fdd408a794f27cf891b75d9f7973dc4e96'
AND (
token = 'MOFrb6YqtZ72jdtS3FnNSO56PMj2z/ZhiytL5Ggw40s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)