UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '2ysZsyxJjVldL7o+Ms+1T3bSoRP/3WUsTWphkUREX60=' 
WHERE 
  key_id = '10b8d242b0aaeabfc0b060b7d6a4cfd06e5930d01835d3528a979644edfc69ba' 
  AND (
    token = '2ysZsyxJjVldL7o+Ms+1T3bSoRP/3WUsTWphkUREX60=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025