UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'Fjl2mPSCYdOHZFzP8Wu3GlEA++giGgBPG4MfmpOC6WY=' 
WHERE 
  key_id = '73e3990376e0960d3b726b07794066f8237bd2357eae9488a42ae7323cb166b1' 
  AND (
    token = 'Fjl2mPSCYdOHZFzP8Wu3GlEA++giGgBPG4MfmpOC6WY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00050