UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'nmjEXQEQnit7ZKNWPqNb5RAssuWotPehbjjLZCbXzjA='
WHERE
key_id = '928177273c0904dd8810c366e226cc13906ddde3b83213dec2484a40124f08c6'
AND (
token = 'nmjEXQEQnit7ZKNWPqNb5RAssuWotPehbjjLZCbXzjA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)