UPDATE
cscart_lock_keys
SET
expiry_at = UNIX_TIMESTAMP(NOW()) + 30,
token = 'INX1F/2TTDtoNqh0H3qKmPFMy42TFjx/5LlsAbbSvhQ='
WHERE
key_id = '7c090597710d05425432786915ca68be0a409263baa234ccf858177a011ba013'
AND (
token = 'INX1F/2TTDtoNqh0H3qKmPFMy42TFjx/5LlsAbbSvhQ='
OR expiry_at <= UNIX_TIMESTAMP(NOW())
)