UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ymExU+d9Vv3Z9lhnWXd6K/ihpvTB/fnbxzsv38MdxGQ='
WHERE
key_id = 'eab14ea5b55baa8edb7fe47ddb59ff647b2594769277f1105af88913fea9f850'
AND (
token = 'ymExU+d9Vv3Z9lhnWXd6K/ihpvTB/fnbxzsv38MdxGQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)