UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'PmZxIKyhMoQa3JLhbpytF/0p6Bww4ZrVt8GiiVz8xKU=' 
WHERE 
  key_id = 'dc036165a240d2bd11aadd63440e04f93249eb54348a32cbc3fb192bae7a15e0' 
  AND (
    token = 'PmZxIKyhMoQa3JLhbpytF/0p6Bww4ZrVt8GiiVz8xKU=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00029