UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'kFqcKkpT4p3tCvvuBg7+fne4Ko9Irzv7HeMNfIKPPMs='
WHERE
key_id = 'e23433db76ec1ecc5c0321b779e4418b54f1e7f3898b6eaddb281fc026d96926'
AND (
token = 'kFqcKkpT4p3tCvvuBg7+fne4Ko9Irzv7HeMNfIKPPMs='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)