UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'y7lDXaXIEM4IPWC15/7SLJPTEzDxeKNTGXbSYfHIKkg='
WHERE
key_id = '427435f292c7b1aa2d60ad7d872bd2eb76ff247910e93dda75eae1a452e76f17'
AND (
token = 'y7lDXaXIEM4IPWC15/7SLJPTEzDxeKNTGXbSYfHIKkg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)