UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Jym95S32OhZjBLKKY/5jSA9HGV+kZhbBcMQ2H4T40DI=' 
WHERE 
  key_id = 'e6dca3587360bf5a89ed50a23b282f0421c2c9b6ba28841f15c71685005e863d' 
  AND (
    token = 'Jym95S32OhZjBLKKY/5jSA9HGV+kZhbBcMQ2H4T40DI=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00027