UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'eC/fxsv/FV0fxCs9QjMNBOaQ7p5jwIcMI/ERbBu3odc='
WHERE
key_id = '9ddbb55b8a017bdd04f2e9b4fe2d74861a2415a46210a8931ddf57fae8ba8233'
AND (
token = 'eC/fxsv/FV0fxCs9QjMNBOaQ7p5jwIcMI/ERbBu3odc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)