UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'cb9xTmnpi1TT82650s6EdheNt7gOw5ROFt9ErI82Qp0=' 
WHERE 
  key_id = 'eb704056d808283fef78b1cdf3b37ded5e4eb62a5a50d6fb79ba4a93df74ee92' 
  AND (
    token = 'cb9xTmnpi1TT82650s6EdheNt7gOw5ROFt9ErI82Qp0=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00028