UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'eK0CiDqXd+WmNo0jMo+9zrIcVOnARORaxgi1cP3oK4w=' 
WHERE 
  key_id = 'e0d8fcf43d0923aa4e2499304399f3e7122e17e21a3730d36dbebcd785bf9c3a' 
  AND (
    token = 'eK0CiDqXd+WmNo0jMo+9zrIcVOnARORaxgi1cP3oK4w=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00034