UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'I1o7jAh/JrxLT3JJBzzLRLjapXAHuqWtd4KeEHJZLTE='
WHERE
key_id = '88e47a3f44f29afbc69db2e4f6b88fd1f51ba618d4528bf97b61523d71f87d62'
AND (
token = 'I1o7jAh/JrxLT3JJBzzLRLjapXAHuqWtd4KeEHJZLTE='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)