UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = '71Lj7ZzBn+BbYAWNFCCphqeoEu5ixIGleM1oQKqpPhM='
WHERE
key_id = '4765a9c6b9adb7141c9eccc35ef9ea5ddb06429dc571216ce873b8af3230e2d6'
AND (
token = '71Lj7ZzBn+BbYAWNFCCphqeoEu5ixIGleM1oQKqpPhM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)