UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'PldRJXiCEni0WIp14C0lyiv1s3seKyvQLgZ6TJBuOsc='
WHERE
key_id = '50cb34bd3ce9ecb74afa59d75c269a85d610950655ba2327c7b0a48d3eb09f34'
AND (
token = 'PldRJXiCEni0WIp14C0lyiv1s3seKyvQLgZ6TJBuOsc='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)