UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '68DFyT6ex/aKTrNFRLpJXFo6Rw50xh5JJhFg2Pv/lZ4=' 
WHERE 
  key_id = '755ad69e0d3086ef102e654be4dc6c8ff1b89fb44c8e503823dfd2dfa33ebf8d' 
  AND (
    token = '68DFyT6ex/aKTrNFRLpJXFo6Rw50xh5JJhFg2Pv/lZ4=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00023