UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'jbGjoRDHPbETfeetNNcx1KSfaVpg5MF9mqmOwBtpo/E=' 
WHERE 
  key_id = '5db927fdf0f2e5c67de014fb8af53add460f28111667afe7693b22ad623ad51b' 
  AND (
    token = 'jbGjoRDHPbETfeetNNcx1KSfaVpg5MF9mqmOwBtpo/E=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00025