UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'GAKsxmLh5MtWTj2PsnY7nLGZgpFCrn0AQeyn/5wBQqU='
WHERE
key_id = '7f84f4fe7c62de19d0eb03eb46545156c1621c2edad104505ed8ac66e7c57c02'
AND (
token = 'GAKsxmLh5MtWTj2PsnY7nLGZgpFCrn0AQeyn/5wBQqU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)