UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'iOnFyA3i9e6JLBUX9PSlPZpjeP5bfsw224q7dOuQOJw=' 
WHERE 
  key_id = '804dd33a89df8ecd703229f95def015e4ff2e32b9362afba1cae9d7653396a02' 
  AND (
    token = 'iOnFyA3i9e6JLBUX9PSlPZpjeP5bfsw224q7dOuQOJw=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00052