UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'IUmPERnk7yfmoEVJrrjL5wfN9NjnnOqumQ/jCQ1SeWY='
WHERE
key_id = 'eeff8a590449b348b61758946c06c022e58a3578c3d20060b19b30a0c66dc4fe'
AND (
token = 'IUmPERnk7yfmoEVJrrjL5wfN9NjnnOqumQ/jCQ1SeWY='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)