UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'FJXvJGNXwoFMvCynvH9w+b4R4EaMX+aA19BNDNBy3cM='
WHERE
key_id = 'f3d15ad9b7a7c7583cadc231b0406dd6ac31a137375bf2e21916bf0eef341832'
AND (
token = 'FJXvJGNXwoFMvCynvH9w+b4R4EaMX+aA19BNDNBy3cM='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)