UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'ecSQ4lpEkhVVqHlx/DqhJX7JKff7H9ycEf7p312zT2I=' 
WHERE 
  key_id = 'a9e2b2e848cd4d1705389271562262990e7475ff4eac37a0080ca4567bf9bce9' 
  AND (
    token = 'ecSQ4lpEkhVVqHlx/DqhJX7JKff7H9ycEf7p312zT2I=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00038