UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = 'EyOYo02s5AS+sVpfsdh8xj2KWkskBSogPz3FWr/jpm8=' 
WHERE 
  key_id = '5b00db667e8149cd52075af17951af636c923d46a8b1a2a70bc46e847a14b825' 
  AND (
    token = 'EyOYo02s5AS+sVpfsdh8xj2KWkskBSogPz3FWr/jpm8=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00035