UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'icixKeoo73ytRqtesI8otZ4LNocy/GwRTgqaIi9lKCk=' 
WHERE 
  key_id = '4db574a90d6365aa3e09c0bc3439992f9b7c7194f0bcb910ac45c0886c82a47d' 
  AND (
    token = 'icixKeoo73ytRqtesI8otZ4LNocy/GwRTgqaIi9lKCk=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00024