UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Rxnrly3hoIe6pkpiC6BAY5uzzNMUpwSvOAMvkrJe6Kg='
WHERE
key_id = '7eaa4fab3d4157e7a27fa5591cbd31483e405d8fb41cbcdeb17f2f188c486aba'
AND (
token = 'Rxnrly3hoIe6pkpiC6BAY5uzzNMUpwSvOAMvkrJe6Kg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)