UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'ZeUS5VLfrzzYTlf3viR1EAWdbLGs3f65lMbBRCYR+N0='
WHERE
key_id = '2878927ba3df99a7243edf423337a2fe651d69c1ae21d5ccd0b08c384467fc7b'
AND (
token = 'ZeUS5VLfrzzYTlf3viR1EAWdbLGs3f65lMbBRCYR+N0='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)