UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '8NeKGEge+/mqgRDq2QwI6bCKnActBiRgH9WlhqguEYA='
WHERE
key_id = '096f095e2e29234182cc42234dd43aace4712c10ad91f2d26ab2f1091d1ded54'
AND (
token = '8NeKGEge+/mqgRDq2QwI6bCKnActBiRgH9WlhqguEYA='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)