UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'WH0kZmhhsv7bOhhD6vexzPF/WvatYWfc+68qfNw4Juc=' 
WHERE 
  key_id = 'c4e8fa16be71b1c6ead4bada81fa67b0b1b8409cf17c9a63e934a0b98be60366' 
  AND (
    token = 'WH0kZmhhsv7bOhhD6vexzPF/WvatYWfc+68qfNw4Juc=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00057