UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'F/ldRU6aB9Cj5VPie5OIFz+xBso2HKgSr98e5fkcT4A='
WHERE
key_id = '7beb6c0fd90b5a596a9bc48d57b1fcfcfbc8c49a7cab0c5fc8a5496289a8f28d'
AND (
token = 'F/ldRU6aB9Cj5VPie5OIFz+xBso2HKgSr98e5fkcT4A='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)