UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '4TVhT+3VVPxPx7GyxnrazCSCW5UErjm+GL9LGN4n/qU='
WHERE
key_id = '68789dc8fb7bc0d4988f72bdac3c61262e5f4d529152ba5156fa1f50bcee8723'
AND (
token = '4TVhT+3VVPxPx7GyxnrazCSCW5UErjm+GL9LGN4n/qU='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)