UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'qW7LH1jTAecvtPfZH6bfN/JaiflHHRcfEaF2WVRwh1s='
WHERE
key_id = '2737a9fbd05338523d75335376ec17afe0284680db0951f7e1a619235e6b5a70'
AND (
token = 'qW7LH1jTAecvtPfZH6bfN/JaiflHHRcfEaF2WVRwh1s='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)