UPDATE 
  cscart_lock_keys 
SET 
  expiry_at = UNIX_TIMESTAMP(NOW()) + 30, 
  token = '3BpFcEFBBC0G5WO8pTcAfHlqfJLyADhM2KgBFlyWraY=' 
WHERE 
  key_id = 'acd19c90224f55a278815a4de77f94bad24cdca2ff1282e492f8baa6f5a94136' 
  AND (
    token = '3BpFcEFBBC0G5WO8pTcAfHlqfJLyADhM2KgBFlyWraY=' 
    OR expiry_at <= UNIX_TIMESTAMP(NOW())
  )

Query time 0.00031