UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PzpFA4coPkYFlBVPmAdLBkfqfFI8WZeku7IMJAQj1DE=' 
WHERE 
  key_id = '60f88ee8a8bc4bfbcda13038a7398de6bb2840c143bc13ee0ec871c9b2af415e' 
  AND (
    token = 'PzpFA4coPkYFlBVPmAdLBkfqfFI8WZeku7IMJAQj1DE=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00049