UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FFNnDsZciT7QCZSM6Lq7nmPklwxcEMjOORBpQ/dCanU='
WHERE
key_id = '0ae383d81a7d6d4ebad354ed62cc780a6544491a65c8c899003f06c94e505396'
AND (
token = 'FFNnDsZciT7QCZSM6Lq7nmPklwxcEMjOORBpQ/dCanU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)