UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'SPH7X+2t6JSS5m867C+sStu1cCgl0tRXbk6rTT0sKBs=' 
WHERE 
  key_id = '08f53328de840b3a3db0bb241de06ac25c00c55bdc1a75161d74302a86e93b4c' 
  AND (
    token = 'SPH7X+2t6JSS5m867C+sStu1cCgl0tRXbk6rTT0sKBs=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00040