UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'Le0ZQ8B7f0z1ijDQbofshye7M+1rBJGM4dsen84Bwxs='
WHERE
key_id = '100013cd83b68ed46dc62c8c39ead968fef0162d1101b590b4d50efc0dd3b936'
AND (
token = 'Le0ZQ8B7f0z1ijDQbofshye7M+1rBJGM4dsen84Bwxs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)