UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'xuoVl2w/6iK3OMN8R46bBO/N0PNzzxzRp7U9wYVxSNg='
WHERE
key_id = '707fbf53138686426eb569a115e9daa9a2356d997bc1ca861e3af0a4ac6053e5'
AND (
token = 'xuoVl2w/6iK3OMN8R46bBO/N0PNzzxzRp7U9wYVxSNg='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)